package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.uuid.IdUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.LsNavigationMapper;
import com.ruoyi.system.domain.LsNavigation;
import com.ruoyi.system.service.ILsNavigationService;

/**
 * 导航栏Service业务层处理
 *
 * @author zhouyipeng
 * @date 2023-10-16
 */
@Service
public class LsNavigationServiceImpl implements ILsNavigationService
{
    @Autowired
    private LsNavigationMapper lsNavigationMapper;

    /**
     * 查询导航栏
     *
     * @param id 导航栏主键
     * @return 导航栏
     */
    @Override
    public LsNavigation selectLsNavigationById(String id)
    {
        return lsNavigationMapper.selectLsNavigationById(id);
    }

    /**
     * 查询导航栏列表
     *
     * @param lsNavigation 导航栏
     * @return 导航栏
     */
    @Override
    public List<LsNavigation> selectLsNavigationList(LsNavigation lsNavigation)
    {
        return lsNavigationMapper.selectLsNavigationList(lsNavigation);
    }

    /**
     * 新增导航栏
     *
     * @param lsNavigation 导航栏
     * @return 结果
     */
    @Override
    public int insertLsNavigation(LsNavigation lsNavigation)
    {
        lsNavigation.setCreateTime(DateUtils.getNowDate());
        lsNavigation.setId(IdUtils.fastSimpleUUID());
        return lsNavigationMapper.insertLsNavigation(lsNavigation);
    }

    /**
     * 修改导航栏
     *
     * @param lsNavigation 导航栏
     * @return 结果
     */
    @Override
    public int updateLsNavigation(LsNavigation lsNavigation)
    {
        return lsNavigationMapper.updateLsNavigation(lsNavigation);
    }

    /**
     * 批量删除导航栏
     *
     * @param ids 需要删除的导航栏主键
     * @return 结果
     */
    @Override
    public int deleteLsNavigationByIds(String[] ids)
    {
        return lsNavigationMapper.deleteLsNavigationByIds(ids);
    }

    /**
     * 删除导航栏信息
     *
     * @param id 导航栏主键
     * @return 结果
     */
    @Override
    public int deleteLsNavigationById(String id)
    {
        return lsNavigationMapper.deleteLsNavigationById(id);
    }
}
